home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DJGPP
/
BCCGRX12.ZIP
/
contrib
/
bcc2grx
/
src
/
bgiext01.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-07
|
4KB
|
92 lines
/*
* BCC2GRX - Interfacing Borland based graphics programs to LIBGRX
* Copyright (C) 1993 Hartmut Schirmer
*
* see bccgrx.c for details
*/
#ifdef __TURBOC__
# include <graphics.h>
#endif
#ifdef __GNUC__
# include "../include/libbcc.h"
#endif
#include "../include/bgiext.h"
unsigned char _dac_normal[256][3] = {
{ 0, 0, 0}, { 0, 0,42}, { 0,42, 0}, { 0,42,42},
{42, 0, 0}, {42, 0,42}, {42,21, 0}, {42,42,42},
{21,21,21}, {21,21,63}, {21,63,21}, {21,63,63},
{63,21,21}, {63,21,63}, {63,63,21}, {63,63,63},
{ 0, 0, 0}, { 5, 5, 5}, { 8, 8, 8}, {11,11,11},
{14,14,14}, {17,17,17}, {20,20,20}, {24,24,24},
{28,28,28}, {32,32,32}, {36,36,36}, {40,40,40},
{45,45,45}, {50,50,50}, {56,56,56}, {63,63,63},
{ 0, 0,63}, {16, 0,63}, {31, 0,63}, {47, 0,63},
{63, 0,63}, {63, 0,47}, {63, 0,31}, {63, 0,16},
{63, 0, 0}, {63,16, 0}, {63,31, 0}, {63,47, 0},
{63,63, 0}, {47,63, 0}, {31,63, 0}, {16,63, 0},
{ 0,63, 0}, { 0,63,16}, { 0,63,31}, { 0,63,47},
{ 0,63,63}, { 0,47,63}, { 0,31,63}, { 0,16,63},
{31,31,63}, {39,31,63}, {47,31,63}, {55,31,63},
{63,31,63}, {63,31,55}, {63,31,47}, {63,31,39},
{63,31,31}, {63,39,31}, {63,47,31}, {63,55,31},
{63,63,31}, {55,63,31}, {47,63,31}, {39,63,31},
{31,63,31}, {31,63,39}, {31,63,47}, {31,63,55},
{31,63,63}, {31,55,63}, {31,47,63}, {31,39,63},
{45,45,63}, {49,45,63}, {54,45,63}, {58,45,63},
{63,45,63}, {63,45,58}, {63,45,54}, {63,45,49},
{63,45,45}, {63,49,45}, {63,54,45}, {63,58,45},
{63,63,45}, {58,63,45}, {54,63,45}, {49,63,45},
{45,63,45}, {45,63,49}, {45,63,54}, {45,63,58},
{45,63,63}, {45,58,63}, {45,54,63}, {45,49,63},
{ 0, 0,28}, { 7, 0,28}, {14, 0,28}, {21, 0,28},
{28, 0,28}, {28, 0,21}, {28, 0,14}, {28, 0, 7},
{28, 0, 0}, {28, 7, 0}, {28,14, 0}, {28,21, 0},
{28,28, 0}, {21,28, 0}, {14,28, 0}, { 7,28, 0},
{ 0,28, 0}, { 0,28, 7}, { 0,28,14}, { 0,28,21},
{ 0,28,28}, { 0,21,28}, { 0,14,28}, { 0, 7,28},
{14,14,28}, {17,14,28}, {21,14,28}, {24,14,28},
{28,14,28}, {28,14,24}, {28,14,21}, {28,14,17},
{28,14,14}, {28,17,14}, {28,21,14}, {28,24,14},
{28,28,14}, {24,28,14}, {21,28,14}, {17,28,14},
{14,28,14}, {14,28,17}, {14,28,21}, {14,28,24},
{14,28,28}, {14,24,28}, {14,21,28}, {14,17,28},
{20,20,28}, {22,20,28}, {24,20,28}, {26,20,28},
{28,20,28}, {28,20,26}, {28,20,24}, {28,20,22},
{28,20,20}, {28,22,20}, {28,24,20}, {28,26,20},
{28,28,20}, {26,28,20}, {24,28,20}, {22,28,20},
{20,28,20}, {20,28,22}, {20,28,24}, {20,28,26},
{20,28,28}, {20,26,28}, {20,24,28}, {20,22,28},
{ 0, 0,16}, { 4, 0,16}, { 8, 0,16}, {12, 0,16},
{16, 0,16}, {16, 0,12}, {16, 0, 8}, {16, 0, 4},
{16, 0, 0}, {16, 4, 0}, {16, 8, 0}, {16,12, 0},
{16,16, 0}, {12,16, 0}, { 8,16, 0}, { 4,16, 0},
{ 0,16, 0}, { 0,16, 4}, { 0,16, 8}, { 0,16,12},
{ 0,16,16}, { 0,12,16}, { 0, 8,16}, { 0, 4,16},
{ 8, 8,16}, {10, 8,16}, {12, 8,16}, {14, 8,16},
{16, 8,16}, {16, 8,14}, {16, 8,12}, {16, 8,10},
{16, 8, 8}, {16,10, 8}, {16,12, 8}, {16,14, 8},
{16,16, 8}, {14,16, 8}, {12,16, 8}, {10,16, 8},
{ 8,16, 8}, { 8,16,10}, { 8,16,12}, { 8,16,14},
{ 8,16,16}, { 8,14,16}, { 8,12,16}, { 8,10,16},
{11,11,16}, {12,11,16}, {13,11,16}, {15,11,16},
{16,11,16}, {16,11,15}, {16,11,13}, {16,11,12},
{16,11,11}, {16,12,11}, {16,13,11}, {16,15,11},
{16,16,11}, {15,16,11}, {13,16,11}, {12,16,11},
{11,16,11}, {11,16,12}, {11,16,13}, {11,16,15},
{11,16,16}, {11,15,16}, {11,13,16}, {11,12,16},
{63,63,63}, {63,63,63}, {63,63,63}, {63,63,63},
{63,63,63}, {63,63,63}, {63,63,63}, {63,63,63}
};
void setrgbdefaults(void)
{
int i;
for (i = 0; i < 256; ++i)
setrgbpalette(i,_dac_normal[i][0],_dac_normal[i][1],_dac_normal[i][2]);
}